package com.ruoyi.transaction.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.transaction.domain.VO.SpuVO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import com.ruoyi.core.domain.Members;

/**
 * 订单售后申请对象 order_after_sales
 *
 * @author yzm
 * @date 2025-08-07
 */
public class YZMOrderAfterSales extends BaseEntity
{
    private static final long serialVersionUID = 1L;



    /** 售后申请ID */
    private Integer id;
    private Members members;
    public Members getMembers() {
        return members;
    }

    public void setMembers(Members members) {
        this.members = members;
    }
    private ShopOrderItem shopOrderItem;
    public ShopOrderItem getShopOrderItem() {
        return shopOrderItem;
    }
    public void setShopOrderItem(ShopOrderItem shopOrderItem) {
        this.shopOrderItem = shopOrderItem;
    }
    private SpuVO spu;

    public SpuVO getSpu() {
        return spu;
    }

    public void setSpu(SpuVO spu) {
        this.spu = spu;
    }

    private ShopOrder shopOrder;
    public ShopOrder getShopOrder() {
        return shopOrder;
    }

    public void setShopOrder(ShopOrder shopOrder) {
        this.shopOrder = shopOrder;
    }

    /** 售后单号 */
    @Excel(name = "售后单号")
    private String afterSalesNumber;

    /** 用户ID（关联用户表） */
    @Excel(name = "用户ID", readConverterExp = "关=联用户表")
    private Integer membersId;

    /** 订单商品项ID（关联 shop_order_item 表） */
    @Excel(name = "订单商品项ID", readConverterExp = "关=联,s=hop_order_item,表=")
    private Integer shopOrderItemId;

    /** 售后类型（1-退货，2-换货） */
    @Excel(name = "售后类型", readConverterExp = "1=-退货，2-换货")
    private Integer type;

    /** 售后状态（1-客服受理，2-寄回退货，3-官方收货，4-已退款/已换货） */
    @Excel(name = "售后状态", readConverterExp = "1=-客服受理，2-寄回退货，3-官方收货，4-已退款/已换货")
    private Integer status;

    /** 售后商品类型（1-已过售后期，2-未过售后期） */
    @Excel(name = "售后商品类型", readConverterExp = "1=-已过售后期，2-未过售后期")
    private Integer orderstatus;

    /** 联系人姓名 */
    @Excel(name = "联系人姓名")
    private String contactName;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String contactPhone;

    /** 退货/换货地址 */
    @Excel(name = "退货/换货地址")
    private String returnAddress;

    /** 申请售后商品数量 */
    @Excel(name = "申请售后商品数量")
    private Integer quantity;

    /** 售后原因，如尺寸不符、质量问题等 */
    @Excel(name = "售后原因，如尺寸不符、质量问题等")
    private String reason;

    /** 图片凭证（JSON数组存URL） */
    @Excel(name = "图片凭证", readConverterExp = "J=SON数组存URL")
    private String proofImages;

    /** 应退款金额 */
    @Excel(name = "应退款金额")
    private BigDecimal refundAmount;

    /** 实退金额（可因物流/手续费调整） */
    @Excel(name = "实退金额", readConverterExp = "可=因物流/手续费调整")
    private BigDecimal actualRefundAmount;

    /** 逻辑删除标志 */
    private String delFlag;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 商品SPU ID */
    @Excel(name = "商品SPU ID")
    private Long spuId;
    /** 订单ID（关联 shop_order） */
    @Excel(name = "订单ID", readConverterExp = "关=联,s=hop_order")
    private Long orderId;

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }

    public void setAfterSalesNumber(String afterSalesNumber)
    {
        this.afterSalesNumber = afterSalesNumber;
    }

    public String getAfterSalesNumber()
    {
        return afterSalesNumber;
    }

    public void setMembersId(Integer membersId)
    {
        this.membersId = membersId;
    }

    public Integer getMembersId()
    {
        return membersId;
    }

    public void setShopOrderItemId(Integer shopOrderItemId)
    {
        this.shopOrderItemId = shopOrderItemId;
    }

    public Integer getShopOrderItemId()
    {
        return shopOrderItemId;
    }

    public void setType(Integer type)
    {
        this.type = type;
    }

    public Integer getType()
    {
        return type;
    }

    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }

    public void setOrderstatus(Integer orderstatus)
    {
        this.orderstatus = orderstatus;
    }

    public Integer getOrderstatus()
    {
        return orderstatus;
    }

    public void setContactName(String contactName)
    {
        this.contactName = contactName;
    }

    public String getContactName()
    {
        return contactName;
    }

    public void setContactPhone(String contactPhone)
    {
        this.contactPhone = contactPhone;
    }

    public String getContactPhone()
    {
        return contactPhone;
    }

    public void setReturnAddress(String returnAddress)
    {
        this.returnAddress = returnAddress;
    }

    public String getReturnAddress()
    {
        return returnAddress;
    }

    public void setQuantity(Integer quantity)
    {
        this.quantity = quantity;
    }

    public Integer getQuantity()
    {
        return quantity;
    }

    public void setReason(String reason)
    {
        this.reason = reason;
    }

    public String getReason()
    {
        return reason;
    }

    public void setProofImages(String proofImages)
    {
        this.proofImages = proofImages;
    }

    public String getProofImages()
    {
        return proofImages;
    }

    public void setRefundAmount(BigDecimal refundAmount)
    {
        this.refundAmount = refundAmount;
    }

    public BigDecimal getRefundAmount()
    {
        return refundAmount;
    }

    public void setActualRefundAmount(BigDecimal actualRefundAmount)
    {
        this.actualRefundAmount = actualRefundAmount;
    }

    public BigDecimal getActualRefundAmount()
    {
        return actualRefundAmount;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }
    public void setSpuId(Long spuId)
    {
        this.spuId = spuId;
    }

    public Long getSpuId()
    {
        return spuId;
    }
    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }

        @Override
        public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("afterSalesNumber", getAfterSalesNumber())
                .append("membersId", getMembersId())
                .append("shopOrderItemId", getShopOrderItemId())
                .append("type", getType())
                .append("status", getStatus())
                .append("orderstatus", getOrderstatus())
                .append("contactName", getContactName())
                .append("contactPhone", getContactPhone())
                .append("returnAddress", getReturnAddress())
                .append("quantity", getQuantity())
                .append("reason", getReason())
                .append("proofImages", getProofImages())
                .append("refundAmount", getRefundAmount())
                .append("actualRefundAmount", getActualRefundAmount())
                .append("delFlag", getDelFlag())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .append("spuId", getSpuId())
                .append("orderId", getOrderId())
                .toString();
    }
}
